<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/* ****************************************************************************
  NAIYUMIE KING WANG JJANG Front End Developer <naiyumie@gmail.com>
  FileType:CRLF, Encording:UTF-8, Tab&Space:4/4
  ------------------------------------------------------------------------
  TDD
**************************************************************************** */

class TmpValidationTest extends N_Controller {

	public function __construct(){
		parent::__construct();
	}


	function index(){

		$validationValueArray = array(
			'mode' => 'update',
			'validationValueArray' => array(
				'pk_uid' => 'ㅎㅎ',
				'st_text_field01' => '한글한글 wgwgwg w gwgegev b wb',
				'st_text_field02' => 'ss',
				'no_text_field03' => '3',
				'dt_date_field01' => '2113-11-12',
				'tm_time_field01' => '22:33:33',
				'pw_password_field01' => 'asdf',
				'fg_checkbox_field01' => 'gege',
				'fg_radio_field01' => 'b',
				'fg_select_field01' => 'c',
				'fg_select_field02' => 'a',
				'tx_textarea_field01' => 'asdfasfwbwbwbbw',
				'fk_xx' => '1'
			),
			'tableName' => 'tbl_a_developer_sample'
		);

		$this->nvalidation->basicValidation($validationValueArray);
		//nPrt($this->nvalidation->vStatArray);
		echo "<div style='border:1px solid silver;padding:10'>";
		echo "<h1>기본 밸리데이션 결과</h1>";
		nPrt($this->nvalidation->vStatFailedResultArray);
		echo "</div>";

		$validationValueArray['extendValidationRuleArray'] = array(
			'st_text_field01' => array('maxlen(15)'),
			'st_text_field02' => array('maxlen(25)'),
			'no_text_field03' => array('maxlen(35)')
		);

		echo "<div style='border:1px solid silver;padding:10'>";
		echo "<h1>확장 밸리데이션 실행</h1>";
		$this->nvalidation->extendValidation($validationValueArray);
		echo "</div>";

		echo "<div style='border:1px solid silver;padding:10'>";
		echo "<h1>확장 밸리데이션 이후 결과</h1>";
		nPrt($this->nvalidation->vStatFailedResultArray);
		echo "</div>";
	}

}